package com.iwhalecloud.bss.kite.cucc.client.dto.attr;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName : UnicomRegionQry
 * @Description : 省市县查询入参对象
 * @Author : zhang.song
 * @Date : 2021/3/19 10:52
 */
@ApiModel(value = "UnicomRegionQry", description = "省市县查询入参对象")
public class UnicomRegionQry {

    @ApiModelProperty(value = "查询区域类型 10：省；20：市；30：区县")
    private String locationType;

    @ApiModelProperty(value = "上级区域编码")
    private String parentAreaCode;

    @ApiModelProperty(value = "上级区域级别")
    private Integer regionLevel;

    @ApiModelProperty(value = "一级区域编码（用于区分国内和国际，二级区域编码国内国际有重复）")
    private String topAreaCode;

    @ApiModelProperty(value = "产品id")
    private String productId;

    private String fieldName;

    private String prodInstId;
    private String sceneInstId;

    public UnicomRegionQry() {
    }

    public UnicomRegionQry(String parentAreaCode, String locationType) {
        this.parentAreaCode = parentAreaCode;
        this.locationType = locationType;
    }

    public UnicomRegionQry(String productId) {
        this.productId = productId;
    }

    public UnicomRegionQry(String parentAreaCode, String locationType, String productId) {
        this.parentAreaCode = parentAreaCode;
        this.locationType = locationType;
        this.productId = productId;
    }

    public String getLocationType() {
        if(locationType == null || "".equals(locationType)) {
            if(regionLevel != null && regionLevel > 0) {
                locationType = String.valueOf(regionLevel + 10);
            }
        }
        return locationType;
    }

    public void setLocationType(String locationType) {
        this.locationType = locationType;
    }

    public String getParentAreaCode() {
        return parentAreaCode;
    }

    public void setParentAreaCode(String parentAreaCode) {
        this.parentAreaCode = parentAreaCode;
    }

    public Integer getRegionLevel() {
        return regionLevel;
    }

    public void setRegionLevel(Integer regionLevel) {
        this.regionLevel = regionLevel;
    }

    public String getTopAreaCode() {
        return topAreaCode;
    }

    public void setTopAreaCode(String topAreaCode) {
        this.topAreaCode = topAreaCode;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProdInstId() {
        return prodInstId;
    }

    public void setProdInstId(String prodInstId) {
        this.prodInstId = prodInstId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getSceneInstId() {
        return sceneInstId;
    }

    public void setSceneInstId(String sceneInstId) {
        this.sceneInstId = sceneInstId;
    }
}
